import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import enLocale from '@/lang/en' // lang i18n
import zhLocale from '@/lang/zh'
import VueI18n from 'vue-i18n'

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'
import checkMeuns from '@/mixin/checkMeuns'

import '@/icons' // icon
import '@/permission' // permission control

import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online ! ! !
 */
if (process.env.NODE_ENV === 'production') {
    const { mockXHR } = require('../mock')
    mockXHR()
}
import * as echarts from 'echarts'

Vue.prototype.$echarts = echarts
<<<<<<< HEAD
import * as filters from '@/filters' // 引入工具类
// 注册全局的过滤器
Object.keys(filters).forEach(key => {
  // 注册过滤器
  Vue.filter(key, filters[key])
})
=======


Vue.use(VueQuillEditor)

>>>>>>> cd9c297e9eaaf3550b407ab1bf2a75465c304e52
// set ElementUI lang to EN
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
// Vue.use(ElementUI)
Vue.use(VueI18n)
const messages = {
        en: {
            ...enLocale // 或者用 Object.assign({ message: 'hello' }, enLocale)
        },
        zh: {
            ...zhLocale // 或者用 Object.assign({ message: '你好' }, zhLocale)
        }
    }
    // Create VueI18n instance with options
const i18n = new VueI18n({
    locale: 'zh', // set locale
    messages // set locale messages
})

Vue.use(ElementUI, {
    i18n: (key, value) => i18n.t(key, value)
})

// 全局混入检查对象
Vue.mixin(checkMeuns) // 表示所有的组件都拥有了检查的方法
    // new Vue({ i18n }).$mount('#app')
Vue.config.productionTip = false

new Vue({
    el: '#app',
    router,
    store,
    i18n,
    render: h => h(App)
})